home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 40 / Mac Magazin and MacEasy Magazine CD - Issue 40.iso / Software / Online / Create Eudora / Create Eudora Folder.txt < prev    next >
Text File  |  1997-11-19  |  2KB  |  57 lines

  1. tell application "Finder"
  2.     activate
  3.     if exists application file id "CSOm" then
  4.         try
  5.             first process whose creator type is "CSOm"
  6.             display dialog ¬
  7.                 "First you need to Quit the Eudora that's currently running." buttons {"OK"} ¬
  8.                 default button 1 ¬
  9.                 with icon 1
  10.         on error
  11.             set whiner to display dialog "Please enter your name:" default answer ""
  12.             if button returned of whiner is not "Cancel" then
  13.                 set fn to text returned of whiner
  14.                 if (offset of ":" in fn) ≠ 0 then
  15.                     display dialog ¬
  16.                         "Try again without colons." buttons {"OK"} ¬
  17.                         default button 1 ¬
  18.                         with icon 0
  19.                 else
  20.                     if fn = "" then
  21.                         set fn to "Eudora Folder"
  22.                     else
  23.                         set fn to fn & "'s Eudora Folder"
  24.                     end if
  25.                     if fn's length > 31 then
  26.                         display dialog ¬
  27.                             "Try again with a shorter name." buttons {"OK"} ¬
  28.                             default button 1 ¬
  29.                             with icon 0
  30.                     else
  31.                         set there to desktop -- customize if needed
  32.                         if exists item fn of there then
  33.                             display dialog ¬
  34.                                 "Try again with a different name." buttons {"OK"} ¬
  35.                                 default button 1 ¬
  36.                                 with icon 1
  37.                         else
  38.                             try
  39.                                 open (make file at (make folder at there with properties {name:fn}) ¬
  40.                                     with properties {name:"Eudora Settings", file type:"PREF", creator type:"CSOm"})
  41.                             on error
  42.                                 beep
  43.                             end try
  44.                         end if
  45.                     end if
  46.                 end if
  47.             end if
  48.         end try
  49.     else
  50.         display dialog ¬
  51.             "I can't find the Eudora application." & return & return ¬
  52.             & "Either it's not installed or the Desktop Database needs to be rebuilt." buttons {"OK"} ¬
  53.             default button 1 ¬
  54.             with icon 0
  55.     end if
  56. end tell
  57.